import 'package:im/Model/userModel.dart';

class ChatContentModel {
  List<UserModel> userIds;
  String lastContent;
  String lastUpdateTime;
  bool ifRead;

  ChatContentModel(
      {required this.userIds,
      required this.lastContent,
      required this.lastUpdateTime,
      required this.ifRead});

  factory ChatContentModel.fromJson(Map<String, dynamic> json) {
    return ChatContentModel(
      userIds: json['userIds'],
      lastContent: json['lastContent'] as String,
      lastUpdateTime: json['lastUpdateTime'] as String,
      ifRead: json['ifRead'] as bool,
    );
  }

  Map<String, dynamic> toJson() => {
        'userIds': userIds,
        'lastContent': lastContent,
        'lastUpdateTime': lastUpdateTime,
        'ifRead': ifRead,
      };
}
